//
//  LeaveWordsTableViewCell.h
//  RainbowFM
//
//  Created by Kratos on 14/12/14.
//  Copyright (c) 2014年 RB. All rights reserved.
//  留言cell

#import <UIKit/UIKit.h>
#import "VoiceView.h"


typedef NS_ENUM(NSInteger, LeaveWordsType){
    LeaveWordsTypeOfText = 1,//纯文字
    LeaveWordsTypeOfImage,//图片
    LeaveWordsTypeOfVoice//语言
};

typedef NS_ENUM(NSInteger,InterlocutionPart){
    InterlocutionPartOfCompere = 1,//主持人
    InterlocutionPartOfSpectator,//观众
    InterlocutionPartOfMyself,//我自己
    InterlocutionPartOfFaceback//意见反馈
};

@class LeaveWordItem;
@interface LeaveWordsTableViewCell : UITableViewCell
@property (nonatomic , strong) NSString *userName;
@property (nonatomic , strong) NSString *time;
@property (nonatomic , strong) NSString *headPath;

@property (nonatomic , weak) IBOutlet UILabel *nameLabel;
@property (nonatomic , weak) IBOutlet UILabel *timeLabel;
@property (nonatomic , strong) UIView *contentsView;

//只存在一个控件
@property (nonatomic , strong) NSString     *contentStr;//展示内容，因控件变化而变化
@property (nonatomic , strong) UIImageView  *contentImageView;
@property (nonatomic , strong) UILabel      *contentTextLabel;
@property (nonatomic , strong) VoiceView    *contentVoiceView;

@property (nonatomic , assign) LeaveWordsType type;
@property (nonatomic , readonly) InterlocutionPart part;

/**
 * 内容
 * @param contentStr
 * @return
 * @author Kratos
 */
-(void)updateContentsWithItem:(LeaveWordItem *)item;

-(void)startVoice;
-(void)stopVoice;

+(CGFloat)cellHightByText:(NSString *)text;

+(CGFloat)cellHightByImage;

+(CGFloat)cellHightByVoice;
@end

